<template>
  <header class="header">
    <img src="../assets/images/logo.png" alt="生鲜超市logo" class="logo">
    <div class="header-right">
      <button class="user-btn" @click="$router.push('/')">
        <el-icon><User /></el-icon>
        首页
      </button>
      <button class="user-btn">
        <el-icon><User /></el-icon>
        用户中心
      </button>
      <button class="shopping-cart-btn">
        <el-icon><ShoppingCart /></el-icon>
        购物车
      </button>
    </div>
  </header>
</template>

<script setup>
import { User, ShoppingCart } from '@element-plus/icons-vue'
// 组件逻辑
</script>

<style scoped>
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding: 15px 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-btn, .shopping-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  min-width: 110px;
  padding: 0 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
  border: none;
}

.user-btn {
  background-color: #fff;
  color: #2c3e50;
  border: 2px solid #e9ecef;
}

.user-btn:hover {
  background-color: #e9ecef;
  transform: translateY(-2px);
}

.shopping-cart-btn {
  background-color: #4CAF50;
  color: white;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.shopping-cart-btn:hover {
  background-color: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.user-btn i, .shopping-cart-btn i {
  font-size: 18px;
  display: flex;
  align-items: center;
}
</style> 